package org.momin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.momin.bean.Systems;
import org.momin.bean.UserInfo;

public interface UserInfoMapper {
	@Select("select * from userinfo where name=#{name} and pwd=#{pwd}")
	UserInfo getUserByNameAndPwd(@Param("name")String name,@Param("pwd")String pwd);
	
	@Select("select * from systems where id in(select sid from rolesystem where rid=#{rid}) order by oid desc")
	List<Systems> getSystemsByRolesId(int rid);
}
